<template>
	<view class="adout-us">
		<common-navbar title="关于我们" />
		<view class="xiaolv-mp-info-container">
			<view class="mp-logo-wrapper">
				<u-image src="/static/image/logo.png" width="100%" height="100%" />
			</view>
			<view class="app-name">
				小律懂法
			</view>
			<view class="app-version">
				当前版本: V{{version}}
			</view>
			<view class="app-introduce">
				小律懂法小程序是一款以法律服务为核心的工具类应用
				软件，为用户提供快速专业的在线法律服务。
			</view>
		</view>
		<view class="about-us-list">
			<cell-item :title="item.title" :label="item.label" titleColor="#1d1d1f" :titleFontsize="28"
				v-for="(item,index) in menuList" :key="index" @click="onClickCell(item,index)" />
		</view>
		<view class="footer-copyright">
			<view class="period-validity">
				Copyright©2022-2025
			</view>
			<view class="period-name">
				小律懂法版权所有
			</view>
		</view>
	</view>
</template>

<script>
	import cellItem from "@/components/cell-item/cellItem";
	export default {
		components: {
			cellItem
		},
		data() {
			return {
				menuList: [{
					title: '官方网站',
					label: 'http://web.gdlzjt.com'
				}, {
					title: '客服电话',
					label: '400-8279-889'
				}, {
					title: '邮箱地址',
					label: 'xldf_@outlook.com'
				}, {
					title: '用户服务协议',
					label: ''
				}, {
					title: '用户隐私政策',
					label: ''
				}, ],
				version:''
			}
		},
		onLoad(){
			this.version = uni.getSystemInfoSync().appVersion;
			console.log('this.version>>>>>>>>>>>>>>>>>>>>>>',this.version)
		},
		methods: {
			onClickCell(item, index) {
				if (index == 0) {
					uni.setClipboardData({
						data: item.label,
						success: () => {
							this.$showToast('已复制到剪贴板')
						}
					});
				} else if (index == 1) {
					uni.makePhoneCall({
						phoneNumber: item.label.replace(/[-]/g, '')
					});
				} else if (index == 2) {
					uni.setClipboardData({
						data: item.label,
						success: () => {
							this.$showToast('已复制到剪贴板')
						}
					});
				}else if(index == 3){
					this.$u.route('/pages/agreeandservices/servicesAgreement')
				}else if(index == 4){
					this.$u.route('/pages/agreeandservices/privacyPolicy')
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	@import "./aboutUs.scss";
</style>
